if(!jvc.ui)jvc.ui=new jvc_ui();
function jvc_ui(){};

if(document.readyState=="complete")jvc_ui_init();
else jvc.attachEvent(window,"load", jvc_ui_init );
function jvc_ui_init(){
	
		var uitypes=[];
		for(var i=0;i<=document.getElementsByTagName("*").length-1;i++){		
		if( document.getElementsByTagName("*")[i].getAttribute("jvc.ui.type") ) {			
			uitypes[uitypes.length]=document.getElementsByTagName("*")[i].getAttribute("jvc.ui.type");			
			
		}
	}
		for(var i=0;i<uitypes.length;i++){
			jvc.include("jvc.ui."+uitypes[i].toLowerCase());
	  }
	
	jvc.init_execute("jvc_ui_init_complete()");
}

jvc.selectAll=function(t,obj){
	
	if(!obj)return;
	
	for(var i=0;i<obj.length;i++){
		
		if(obj[i].jvcOriginal)continue;
		
		obj[i].checked=t.checked;
	}	
}
jvc.selectCount=function(obj){
	if(!obj)return 0;
	var count=0;
	for(var i=0;i<obj.length;i++){
		if(obj[i].jvcOriginal)continue;
		if(obj[i].checked)count++;
	}	
	return count;
}

function jvc_ui_init_complete(){
		for(var i=0;i<=document.getElementsByTagName("*").length-1;i++){		
		if( document.getElementsByTagName("*")[i].getAttribute("jvc.ui.type") ) {
			var uitype=document.getElementsByTagName("*")[i].getAttribute("jvc.ui.type");		
			var obj=eval("jvc.ui."+uitype.toLowerCase());			
			obj.set(document.getElementsByTagName("*")[i]);
			
		}
	}
	hiddenWait();
}